import Router from "koa-router"
import bodyParser from "koa-bodyparser"
import { getControllers,regControllers } from "../utils/tools.js";
import cors from "@koa/cors"



let router=new Router();

export const userControllers=function(app){
    app.use(cors())
    app.use(bodyParser())
    let controllersFiles=getControllers()
    regControllers(router,controllersFiles)
    app.use(router.routes())
}